Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Assign message to ad-hoc group with matching name and members (#5385) #5779

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Jul 16, 2024

This should fix ad-hoc groups splitting when messages are fetched out of order from different
folders or otherwise reordered, or some messages are missing so that the messages reference chain is
broken, or a member was removed from the thread and readded later, etc. Even if this way two
different threads are merged, it looks acceptable, having many threads with the same name/subject
and members isn't a common use case.

Fix #5385

@iequidoo iequidoo force-pushed the iequidoo/ignore-member-removal branch from 6888326 to c532f4c Compare July 16, 2024 00:31
@iequidoo iequidoo force-pushed the iequidoo/assign-to-similar-adhoc-grp branch from 8a6fa11 to 6b0bff1 Compare July 16, 2024 00:33
@iequidoo iequidoo marked this pull request as ready for review July 16, 2024 14:18
@iequidoo iequidoo requested a review from link2xt July 16, 2024 14:18
Base automatically changed from iequidoo/ignore-member-removal to main July 17, 2024 20:25
@iequidoo iequidoo force-pushed the iequidoo/assign-to-similar-adhoc-grp branch from 6b0bff1 to 6bd9681 Compare July 17, 2024 20:28
@iequidoo
Copy link
Collaborator Author

iequidoo commented Aug 3, 2024

Btw, i just received several mails from github and that's how it looks curently:
image
These are unrelated threads, but even Gmail Android app merges them to a signle thread. Once this PR is merged, Delta Chat will do the same.

EDIT: I checked, Gmail app does the same as this PR apparently, it merges threads with the same Subject and participants.

@iequidoo iequidoo force-pushed the iequidoo/assign-to-similar-adhoc-grp branch from 6bd9681 to 683c681 Compare August 3, 2024 00:50
@iequidoo iequidoo force-pushed the iequidoo/assign-to-similar-adhoc-grp branch 2 times, most recently from 5991a16 to 363aa23 Compare September 20, 2024 22:37
Copy link
Collaborator

@link2xt link2xt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to also have a test where a message arrives that does not match the member list, otherwise complex SQL query is not tested and could be just a subject match.

src/receive_imf/tests.rs Outdated Show resolved Hide resolved
src/receive_imf.rs Outdated Show resolved Hide resolved
@iequidoo iequidoo force-pushed the iequidoo/assign-to-similar-adhoc-grp branch from 363aa23 to a7aaef2 Compare September 26, 2024 17:28
Copy link
Collaborator

@link2xt link2xt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a migration 120 now, so needs a rebase, but otherwise LGTM.

…5385)

This should fix ad-hoc groups splitting when messages are fetched out of order from different
folders or otherwise reordered, or some messages are missing so that the messages reference chain is
broken, or a member was removed from the thread and readded later, etc. Even if this way two
different threads are merged, it looks acceptable, having many threads with the same name/subject
and members isn't a common use case.
@iequidoo iequidoo force-pushed the iequidoo/assign-to-similar-adhoc-grp branch from a7aaef2 to e94af72 Compare September 26, 2024 19:46
@iequidoo iequidoo merged commit fe0c995 into main Sep 26, 2024
37 checks passed
@iequidoo iequidoo deleted the iequidoo/assign-to-similar-adhoc-grp branch September 26, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two groups accidentally created while fetching pending messages after backup restore
2 participants